#!/bin/bash

RDOC_TARBALL=myvnet-rdoc.tar.gz

if test -d doc/rdoc; then
  rm -fr doc/rdoc/
fi

rdoc --exclude tests --main myvnetd.rb --op doc/rdoc

cd doc
if tar czf $RDOC_TARBALL rdoc/; then
  echo -e "\ndoc/${RDOC_TARBALL} successfully created\n";
else
  echo -e "\nError creating doc/${RDOC_TARBALL}\n";
fi
cd ..

